using System;
using System.Collections.Generic;
using System.Text;
using DTO;
using DAL;

namespace BUS
{
    public class tbchitietdonhangBUS
    {
        public static void Insert(tbchitietdonhangDTO ctdh)
        {
            tbchitietdonhangDAL tbchitietdonhangDAL = new tbchitietdonhangDAL();
            tbchitietdonhangDAL.Insert(ctdh);
        }
        public static void Update(tbchitietdonhangDTO ctdh)
        {
            tbchitietdonhangDAL tbchitietdonhangDAL = new tbchitietdonhangDAL();
            tbchitietdonhangDAL.Update(ctdh);
        }
        public static void Delete(int iD)
        {
            tbchitietdonhangDAL tbchitietdonhangDAL = new tbchitietdonhangDAL();
            tbchitietdonhangDAL.Delete(iD);
        }
        public static tbchitietdonhangDTOColection GET(string Where, int PageIndex, int PageSize,
                                        string OrderBy, string OrderDirection,
                                        out int TotalRecords)
        {
            tbchitietdonhangDAL tbchitietdonhangDAL = new tbchitietdonhangDAL();
            return tbchitietdonhangDAL.GET(Where, PageIndex, PageSize,
                            OrderBy, OrderDirection, out TotalRecords);
        }
        public static tbchitietdonhangDTOColection GETAll()
        {
            int t = 0;
            tbchitietdonhangDAL tbchitietdonhangDAL = new tbchitietdonhangDAL();
            return tbchitietdonhangDAL.GET("where 1=1", 0, 10, tbchitietdonhangDTOColumn.Mactdh.ToString(), "ASC", out t);
        }
    }
}
